package com.regex;

public class Simple1 {

	public static void main(String[] args) {
		// -出现一次或0次；+出现1次或多次
		System.out.println("-1234".matches("-?\\d+"));
		System.out.println("5678".matches("-?\\d+"));
		System.out.println("+911".matches("-?\\d+"));
		System.out.println("+911".matches("(-|\\+)?\\d+"));
	}

}
